package prof.test.drive;


import student.Observer;
import student.StudentColeric;
import student.StudentFlegmatic;
import student.StudentMelancolic;
import student.StudentSangvinic;
import work.Citeste;
import work.Tema;
import work.Work;
import command.BiblioCommand;
import command.Command;
import command.Profesor;
import command.TemaCommand;

public class ProfTestDrive {
	public static void main(String[] args) {
		Profesor p = new Profesor("Ion Popescu"); 
		Work t = new Tema("Sablon de proiectare", 10,2,6,2);
		Work t1 = new Tema("Inteligenta artificiala", 10,2,6,2);
		Work dc = new Citeste("Sablonul Composite", 25);
		
		
		Command c1 = new TemaCommand();
		System.out.println("Command 1 - Done!");
		Command c2 = new TemaCommand();
		System.out.println("Command 2 - Done!");
		Command c3 = new BiblioCommand();
		System.out.println("Command 3 - Done!");
		
		System.out.println();
		
		c1.exec(t);
		c2.exec(t1);
		c3.exec(dc);
		
		System.out.println();
		
		Observer s1 = (Observer) new StudentSangvinic("Ion");
		Observer s2 = (Observer) new StudentColeric("Roxana");
		Observer s3 = (Observer) new StudentFlegmatic("Dorin");
		Observer s4 = (Observer) new StudentMelancolic("Mihai");
		
		s1.displayName();
		s2.displayName();
		s3.displayName();
		s4.displayName();
		
		System.out.println();
		
		p.addObserver(s1);
		p.addObserver(s2);
		p.addObserver(s3);
		p.addObserver(s4);
		
		
		
		System.out.println(s1 +" added");
		System.out.println(s2 + " added");
		System.out.println(s3 + " added");
		System.out.println(s4 + " added");
		
		System.out.println(t);
		p.notifyAll(c1);
		System.out.println(t1);
		p.notifyAll(c2);
		System.out.println(dc);
		p.notifyAll(c3);
		
		
		
		
		
	}

}
